var MAX_PER_LINE = 5;

String.prototype.trim = function() {
		return (this.replace(/^[\s\xA0]+/, "").replace(/[\s\xA0]+$/, ""));
	};

String.prototype.startsWith = function(str) {
		return (this.match("^"+str)==str);
	};

String.prototype.endsWith = function(str) {
		return (this.match(str+"$")==str);
	};

function alertMsg(titleText, msgText, fieldRef) {
      	Ext.MessageBox.show({
          title: titleText,
          msg: msgText,
          buttons: Ext.MessageBox.OK,
          animEl: fieldRef,
          icon: 'info'
      });
}